<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddPhoneAddressToMembersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('members', function (Blueprint $table) {
            $table->string('phone')->comment('手机号码')->nullable();
            $table->boolean('is_authenticated_phone')->comment('手机验证')->default(false);
            $table->string('address')->comment('地址')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('members', function (Blueprint $table) {
            $table->dropColumn('phone');
            $table->dropColumn('is_authenticated_phone');
            $table->dropColumn('address');
        });
    }
}
